Coffee School Game Lesson Two - Creating the Environment and the Obstacles
Code Editor
Preview
Console Log:
Game Lesson Two - Creating the Environment and the Obstacles
Time estimate for this lesson: 30 minutes
For our game, the key gameplay mechanic is making the player pass through an unending series of obstacles of differing height. Another key point in such a game is to not let the player touch the ground of the scene.
To start work on the environment and the obstacles we’re going to begin with creating our ground. We’re starting with the ground so that we can use the dimensions of our ground in the way we create our obstacles during the game.
Following the style of Crafty we’re going to create our ground and obstacles as entities, while also creating a reusable function for a set of code which we want to use a large number of times.